package string;

/**
 * static String valueOf(数据类型 o)
 * 将其他类型转换为字符串类型
 */
public class ValueOfDemo {
    public static void main(String[] args) {
        int i =123456;
        System.out.println(i+1);
        String s = String.valueOf(i);
        System.out.println(s+1);
        double d = 123.456;
        System.out.println(d+0.1);
        s = String.valueOf(d);
        System.out.println(s+0.1);

        s = d +"";
        System.out.println(s);
    }
}
